速報APP / 工具 / Kendali Relay 4 Chanel Arduino

Kendali Relay 4 Chanel Arduino

價格:免費

更新日期:2019-05-11

檔案大小:4.5M

目前版本:1.0

版本需求:Android 4.0 以上版本

官方網站:http://bionweb.com

Email:agunghariwahyudi002@gmail.com

聯絡地址:Patran RT 19 RW 09 Kalitengah Wedi Klaten

Kendali Relay 4 Chanel Arduino(圖1)-速報App

Relay Aktif Low

Wiring Diagram

Arduino dengan Bluetooth HC05

Arduino----------Bluetooth HC05

Tx----------------Rx

Rx----------------Tx

5V----------------5V

GND---------------GND

Arduino dengan Relay 4 Chanel

Arduino---------------Relay

2-----------------Relay 1

3-----------------Relay 2

4-----------------Relay 3

5-----------------Relay 4

Sketh Arduino

int DataBluetooth;

void setup() {

Serial.begin(9600);

pinMode(2,OUTPUT); //Relay 1

pinMode(3,OUTPUT); //Relay 2

pinMode(4,OUTPUT); //Relay 3

pinMode(5,OUTPUT); //Relay 4

digitalWrite(2,HIGH);

digitalWrite(3,HIGH);

digitalWrite(4,HIGH);

digitalWrite(5,HIGH);

}

void loop() {

if (Serial.available()){

DataBluetooth=Serial.read();

// Menyalakan Relay 1

if(DataBluetooth=='A'){

Kendali Relay 4 Chanel Arduino(圖2)-速報App

digitalWrite(2,LOW);

}

//Mematikan Relay 1

if(DataBluetooth=='B'){

digitalWrite(2,HIGH);

}

// Menyalakan Relay 2

if(DataBluetooth=='C'){

digitalWrite(3,LOW);

}

//Mematikan Relay 2

if(DataBluetooth=='D'){

digitalWrite(3,HIGH);

}

// Menyalakan Relay 3

if(DataBluetooth=='D'){

digitalWrite(4,LOW);

}

//Mematikan Relay 3

if(DataBluetooth=='E'){

digitalWrite(4,HIGH);

}

// Menyalakan Relay 4

if(DataBluetooth=='F'){

digitalWrite(5,LOW);

}

//Mematikan Relay 4

if(DataBluetooth=='G'){

digitalWrite(5,HIGH);

}

Kendali Relay 4 Chanel Arduino(圖3)-速報App

}

}